import { post } from "@/utils/request";

// 添加商品
export const addGoods = (data) => {
  return post("/shop/merchant/merchantCommodityAdd", data);
};

// 修改商品
export const updateGoods = (data) => {
  return post("/shop/merchant/merchantCommodityUpdate", data);
};

// 删除商品
export const deleteGoods = (data) => {
  return post("/shop/merchant/merchantCommodityDel", data);
};

// 获取商品列表
export const getGoodsList = (data) => {
  return post("/shop/merchant/merchantCommodityList", data);
};

// 商品上架下架
export const goodsOnOff = (data) => {
  return post("/shop/merchant/merchantCommodityUp", data);
};

// 订单发货
export const orderShip = (data) => {
  return post("/shop/merchant/merchantDeliver", data);
};

// 修改订单支付金额
export const updateOrderPayAmount = (data) => {
  return post("/shop/merchant/merchantPayAmount", data);
};

// 修改订单支付方式
export const updateOrderPayMethod = (data) => {
  return post("/shop/merchant/merchantOrderChangePrice", data);
};

// 获取订单列表
export const getOrderList = (data) => {
  return post("/shop/merchant/userOrderList", data);
};

// 商品分类
export const getGoodsClassify = (data) => {
  return post("/api/cc/ccL", data);
};
